package com.groupscore.score.service;


import com.groupscore.score.dao.ExceptionCatDao;
import com.groupscore.score.dao.UserExceptionDao;
import com.groupscore.score.pojo.ExceptionCat;
import com.groupscore.score.pojo.UserException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Example;
import org.springframework.data.domain.ExampleMatcher;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Optional;


@Service
public class ExcepitionCatService {

    @Autowired
    private ExceptionCatDao exceptionCatDao;

    public List<ExceptionCat> findAll(){
        return exceptionCatDao.findAll();
    }

    public ExceptionCat findOne(Integer id){

        return exceptionCatDao.findById( id ).get();
    }
}
